<template>
  <div @touchmove.prevent class="crm-cover" @click="hideCover()"></div>
</template>

<script>

  import {
    HIDE_COVER
  } from '../store/mutation-types';

  export default{
  props:{
    hideCoverOnClick : {
      type: Boolean,
      default: true
    }
  },
  //
  methods:{
    hideCover () {
    if(this.hideCoverOnClick === true) {
      this.$store.commit(HIDE_COVER);
    }
    }
  }
  }
</script>

<style lang="less">
  .crm-cover{
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 100;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0, 0.8);
  }
</style>
